//
//  Commen.swift
//  M-Weibo
//
//  Created by ZXX on 16/4/18.
//  Copyright © 2016年 ZXX. All rights reserved.
//

import Foundation
import UIKit


///表情控制的通知
let EmoticonButtonNSNotification = "EmoticonButtonNSNotification"
///表情键盘删除按钮的通知
let EmoticonDeleteButtonNSNotification = "EmoticonDeleteButtonNSNotification"
/// 切换根视图使用通知名字标识
let SwitchDefaultVcNSNotification = "SwitchDefaultVcNSNotification"


// 微博登陆需要的账号
//let CZWeiboName = "1246403921@qq.com"
//let CZWeiboPasswd = "Vtsl131028"

// 微博登陆需要的账号
let CZWeiboName = "jubeisi0516873@163.com"
let CZWeiboPasswd = "958794"

// 新浪微博需要的参数数据
let APPKEY = "2502178694"
let APPSECRET = "cab21a615b11a37b9000c9082ddad03d"
let REDIRECT_URI = "http://www.baidu.com/"


//屏幕的宽高
let SCREENWIDTH = UIScreen.mainScreen().bounds.size.width
let SCREENHEIGHT = UIScreen.mainScreen().bounds.size.height

//APP 主题颜色
let ThemeColor = UIColor.orangeColor()

//RGB 颜色
func RGB(red red:CGFloat, green:CGFloat, blue:CGFloat)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1)
}

//RGB随机色
func RandomColor ()->UIColor{
    // random() 有一个bug 每次程序启动起来后产生的随机数 都是相同
    let r = random()%256
    let g = random()%256
    let b = random()%256
    
    return RGB(red: CGFloat(r), green:  CGFloat(g), blue:  CGFloat(b))
}